<h3>订单信息</h3>
<table style="border:none;width:60%;">
  <tbody>
    <tr>
      <td>订单编号:<%=detail.id%></td>
      <td>下单时间:<%=@order.created_at.strftime("%y-%m-%d %I:%M%p")%></td>
      <td>订单状态:<%=format_status @order.status if @order.status%></td>
      <td>付款方式:<%=format_paytype @order.paytype if @order.paytype%></td>
      <td>账号:<%= link_to @order.user.login,@order.user,:rel=>"#overlay"%></td>
    </tr>
  </tbody>
</table>
<hr class="break" />
<h3>商品列表</h3>
<table class="admin">
  <thead>
    <tr>
      <th>商品</th>
      <th>尺寸</th>
      <th>单价</th>
      <th>数量</th>
      <th>小计</th>
      <th>颜色</th>
      <th>图案</th>
    </tr>
  </thead>

  <tbody>
    <% detail.line_items.each do |l| %>
      <tr>
        <td>
          <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="50" height="50" id="duoduo" align="middle">
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="FlashVars" value="product_id=<%=l.product_id%>" />
            <param name="allowFullScreen" value="false" />
            <param name="wmode" value="transparent">
            <param name="movie" value="/flash/pics50.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />
            <embed  wmode="transparent" src="/flash/pics50.swf?product_id=<%=l.product_id%>" quality="high" bgcolor="#ffffff" width="50" height="50" name="duoduo" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
          </object>
        </td>
        <td><%=l.tee_size%></td>
        <td><%=l.product.price%></td>
        <td><%=l.quantity%></td>
        <td><%=l.price%></td>
        <td>
          <a href="/styles/<%= l.product.material.style_id %>/materials/<%= l.product.material.id %>" rel="#overlay" style="text-decoration:none">
            <%=l.product.material.sn%>
          </a>
        </td>
        <td>
          <%=l.product.designs_string%>
        </td>
      </tr>
    <% end  %>
  </tbody>
</table>
<hr class="break" />
<h3>物流信息</h3>
<table>
  <tbody>
    <tr>
      <td><%=detail.address.title if detail.address %></td>
    </tr>
    <tr>
      <td>物流方式:<%=detail.logistic.name if detail.logistic%></td>
    </tr>
    <tr>
      <td>物流单号:<%=detail.logistics_order_no%></td>
    </tr>
    <tr>
      <td>物流费用:<span class="yen"><%= detail.logistics_fee if detail.logistic%></span></td>
    </tr>
    <tr>
      <td>买家留言:<%=detail.remark%></td>
    </tr>
  </tbody>
</table>

<% if merchandiser? %>
<hr class="break" />
<h3>订单管理</h3>
<table>
  <tr>
    <td>订单状态</td>
    <td  colspan="7" style="text-align:left;">
      <% form_for detail do |f| %>
        <%=f.select(:status,Order::STATUS,:prompt => "请选择..")%>

        <label for="order_logistics_order_no">物流号:</label>
        <%= f.text_field :logistics_order_no,:size=>'15' %>

        <label for="order_remark">备注:</label>
        <%= f.text_field :remark,:size=>'35' %>
        <%= submit_tag "修改",:confirm => '确定修改支付状态?'  %>
      <% end %>
    </td>
  </tr>
</table>

<%end%>